projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a44651
)
Don't leak on non-uniq blank names. Don't read past beginning of string
author
robertl
<robertl>
Fri, 18 Mar 2005 19:20:31 +0000
(19:20 +0000)
committer
robertl
<robertl>
Fri, 18 Mar 2005 19:20:31 +0000
(19:20 +0000)
on blank names after blank whacking applied.
mkshort.c
patch
|
blob
|
history
diff --git
a/mkshort.c
b/mkshort.c
index 48ab322d87ecb6fc9c3405bc8409035f2e097e9b..1efcb7812b3c2bb0f1af8c0a9ad349d05390a66a 100644
(file)
--- a/
mkshort.c
+++ b/
mkshort.c
@@
-387,7
+387,7
@@
mkshort(void *h, const char *istring)
* Walk in the Woods 2.
*/
np = ostring + strlen(ostring);
- while (isdigit(*(np-1) )) {
+ while (
*np &&
isdigit(*(np-1) )) {
np--;
}
if (np) {
@@
-407,6
+407,7
@@
mkshort(void *h, const char *istring)
* let the must_uniq code handle it.
*/
if (ostring[0] == '\0') {
+ xfree(ostring);
ostring = xstrdup("WPT");
}